
import request from '../utils/request'


// 题目相关接口
export const questionApi = {
    // 获取题目列表
    getQuestionPage: (data) => request({
        url: '/question/question/page',
        method: 'post',
        data
    }),
    // 添加题目
    addQuestion: (data) => request({
        url: '/question/question',
        method: 'post',
        data
    }),
    // 获取题目详情
    getQuestionDetail: (id) => request({
        url: `/question/question/${id}`,
        method: 'get'
    }),
    // 更新题目
    updateQuestion: (data) => request({
        url: `/question/question`,
        method: 'put',
        data
    }),
    // 删除题目
    deleteQuestion: (id) => request({
        url: `/question/question/${id}`,
        method: 'delete'
    }),
    // 保存题目
    saveAnswer: (data) => request({
        url: '/question/answer/v1/saveAnswer',
        method: 'post',
        data
    }),
    // 保存全部题目
    saveAllAnswer: (data) => request({
        url: '/question/answer/v1/saveAllAnswer',
        method: 'post',
        data
    }),
} 